package cn.hx.controller.front.item;

import cn.hx.entity.ItemInfo;
import cn.hx.entity.ItemMaterial;
import cn.hx.service.ItemInfoService;
import cn.hx.service.ItemMaterialService;
import cn.hx.service.UserEvaluationService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;

@Controller
public class itemInfoController {
    @Resource
    ItemInfoService itemInfoService;
    @Resource
    ItemMaterialService itemMaterialService;
    @Resource
    UserEvaluationService userEvaluationService;
    @GetMapping("re_approve/guide")
   public ModelAndView itemInfo(Integer id){
        ModelAndView modelAndView = new ModelAndView("re_approve/guide");
        ItemInfo itemInfo = itemInfoService.queryById(id);
        modelAndView.addObject("itemInfo",itemInfo);
        System.out.println(itemInfo);
        ItemMaterial itemMaterial = itemMaterialService.queryById(id);
        modelAndView.addObject("itemMaterial",itemMaterial);
        return modelAndView;

   }
}




